<template>
	<view>
		<search id="search-static" :value="searchValue" @input="searchValue=$event.detail.value" placeholder="请输入搜索内容"></search>
		<view v-if="showFixedSearch" style="position: fixed;top: 0upx;width: 100%;z-index:10;">
			<search :value="searchValue" @input="searchValue=$event.detail.value" placeholder="请输入搜索内容"></search>
		</view>
		<order-item></order-item>
		<order-item></order-item>
		<order-item></order-item>
		<order-item></order-item>
		<order-item></order-item>
		<order-item></order-item>
		<order-item></order-item>
		<order-item></order-item>
		<order-item></order-item>
		<order-item></order-item>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchValue:'',
				showFixedSearch:false
			}
		},
		onLoad() {

		},
		onPageScroll(res){
			const that=this;
			uni.createSelectorQuery().in(that).select('#search-static').boundingClientRect(data => {
				if(data.top<=0)
					that.showFixedSearch=true;
				else
					that.showFixedSearch=false;
			}).exec();
		},
		methods: {
			
		}
	}
</script>
<style lang="scss" scoped>
	
</style>
